import request from '@/utils/request'

export function getTeacherList() {
  return request({
    url: '/edu/teacher/list',
    method: 'get'
  })
}

export function queryTeacher(page, size, data) {
  return request({
    url: `/edu/teacher/${page}/${size}`,
    method: 'post',
    data: data
  })
}

export function deleteTeacherById(id) {
  return request({
    url: `/edu/teacher/delete/${id}`,
    method: 'delete'
  })
}

export function saveTeacher(teacher) {
  return request({
    url: `/edu/teacher/save`,
    method: 'post',
    data: teacher
  })
}

export function updateTeacher(teacher) {
  return request({
    url: `/edu/teacher/update`,
    method: 'post',
    data: teacher
  })
}

export function getTeacherById(id) {
  return request({
    url: `/edu/teacher/${id}`,
    method: 'get'
  })
}

export function upload() {
  return request({
    url: `/oss/upload`,
    method: 'post'
  })
}
